export default {
    namespaced:true,
    state(){
        return {
            userInfo:null
        }
    },
    mutations:{
        initUserInfoMut(state,info){ //此处的info中会包含token
            state.userInfo = info 
            if(info){
                localStorage.setItem('userInfo',JSON.stringify(info))
            }else{
                localStorage.removeItem('userInfo')
            }
        }
    }
}